import java.io.IOException;

import org.apache.lucene.search.Hits;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;


public class Buscador {
	
	long start, stop = 0;
	
	public Buscador(){
		
	}
	
	@SuppressWarnings("deprecation")
	public Hits buscar(IndexSearcher i, Query q) throws IOException{
		start = System.currentTimeMillis();
		Hits hits = i.search(q);
	    stop = System.currentTimeMillis();
	    return hits;
	}
	
	public long getTiempo(){
		return stop - start;
	}
	
}
